package org.vison.wonfu.framework.soa.annotation;
import org.vison.wonfu.framework.soa.annotation.HttpMethod;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * <code>
 * // @Method(path = "/v2/door/{id}", http = @HttpMethod(
 *             method = RequestMethod.GET,
 *             paramsMode = ParamsMode.PARAMS,
 *             resultMode = ResultMode.STRING, completeResult = true))
 *     String queryDoorInfo(QueryDoorInfoReq req);
 *
 *
 * //     @Method(path = "/v2/order/get-price", http = @HttpMethod(
 *             method = RequestMethod.POST,
 *             paramsMode = ParamsMode.BODY_JSON,
 *             resultMode = ResultMode.STRING, completeResult = true))
 *     String queryPrice(QueryPriceReq req);
 * </code>
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface SoaMethod {
    int timeout() default 5000;
    /**
     * 方法名称
     */
    String value() default "";

    String paramDesc() default "";

    String path() default "";

    String commandKey() default "";

    /**
     * 方法名称 用来描述该方法的作用
     */
    String methodName() default "";

    String loadbalance() default "";


    int connectionTimeout() default 0;

    String description() default "";

    Class<?> fallback() default void.class;

    HttpMethod http() default @HttpMethod;

    boolean oneWay() default false;
}